Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Jest 26 blog post #9950

Merged
merged 18 commits into from
May 5, 2020
Merged

Add Jest 26 blog post #9950

merged 18 commits into from
May 5, 2020

Conversation

cpojer
Copy link
Member

@cpojer cpojer commented May 2, 2020

Jest 26, yeah!

@SimenB
Copy link
Member

SimenB commented May 2, 2020

Thanks for getting this started! I'll add a paragraph about new fake timers (when I land it) and one for native ESM support

@cpojer cpojer marked this pull request as ready for review May 2, 2020 11:47
@cpojer cpojer added this to the Jest 26 milestone May 2, 2020
@cpojer cpojer mentioned this pull request May 2, 2020
@codecov-io
Copy link

codecov-io commented May 2, 2020

Codecov Report

Merging #9950 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9950      +/-   ##
==========================================
- Coverage   63.92%   63.90%   -0.02%     
==========================================
  Files         293      293              
  Lines       12489    12489              
  Branches     3080     3080              
==========================================
- Hits         7983     7981       -2     
- Misses       3862     3863       +1     
- Partials      644      645       +1     
Impacted Files Coverage Δ
packages/expect/src/utils.ts 94.96% <0.00%> (-1.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3669a86...1165de3. Read the comment docs.

* `[jest-config, jest-resolve]` Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943))
* TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823))

With the above changes Jest 26 is now 4 MiB smaller than Jest 25.5.4 (53 → 49 MiB). Please keep in mind that many dependencies like Babel are likely already part of your project. Jest's own size was reduced from 4.3 MiB to 3.1 MiB.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the sizes comparing 26 alpha and 25.5.4.


With the above changes Jest 26 is now 4 MiB smaller than Jest 25.5.4 (53 → 49 MiB). Please keep in mind that many dependencies like Babel are likely already part of your project. Jest's own size was reduced from 4.3 MiB to 3.1 MiB.

While this is a good start, it isn’t enough to make Jest meaningfully leaner. We are planning on gradually reducing Jest's size by about 70%. Most of the changes to reduce Jest’s default setup will be small breaking changes and we want to bring the community with us as much as possible. Therefore we will make the following changes in Jest 27 and Jest 28 using a [“Tick-Tock" release process](https://en.wikipedia.org/wiki/Tick%E2%80%93tock_model):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 70% is reasonable if we remove Babel, Jasmine and JSDOM from the default install. Removing all of them likely has a bigger effect than removing them one by one as some transitive deps are probably shared.

@cpojer cpojer force-pushed the master branch 2 times, most recently from a668c95 to 3551eb8 Compare May 2, 2020 16:10
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll come back with paragraphs for ESM and new fake timers later

website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved

* Dropped support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423))
* `[jest-environment-jsdom]` Upgrade `jsdom` to v16 ([#9606](https://github.com/facebook/jest/pull/9606))
* `[jest-runtime]` Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should call out the lint rule that will autofix this for folks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* `[jest-haste-map]` Removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535))
* `[jest-circus]` Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129))
* `[jest-circus]` Throw a proper error if a test / hooks is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096))
* ***TODO***
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should add #9965

Copy link
Contributor

@jeysal jeysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Comments are a couple of suggestions; and was wondering about the 70%

website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
cpojer and others added 7 commits May 4, 2020 22:45
Co-authored-by: Orta <orta.therox+github@gmail.com>
Co-authored-by: Orta <orta.therox+github@gmail.com>
Co-authored-by: Orta <orta.therox+github@gmail.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
cpojer and others added 4 commits May 4, 2020 22:45
Co-authored-by: Tim Seckinger <seckinger.tim@gmail.com>
Co-authored-by: Tim Seckinger <seckinger.tim@gmail.com>
Co-authored-by: Tim Seckinger <seckinger.tim@gmail.com>
Co-authored-by: Tim Seckinger <seckinger.tim@gmail.com>
Copy link
Member

@rickhanlonii rickhanlonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Show resolved Hide resolved
website/blog/2020-05-06-jest-26.md Show resolved Hide resolved
cpojer and others added 4 commits May 5, 2020 13:40
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
website/blog/2020-05-06-jest-26.md Outdated Show resolved Hide resolved
@cpojer cpojer merged commit 9c832f1 into jestjs:master May 5, 2020
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants